//package com.cg.config;
//
//import org.springframework.amqp.core.Binding;
//import org.springframework.amqp.core.BindingBuilder;
//import org.springframework.amqp.core.Queue;
//import org.springframework.amqp.core.TopicExchange;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class RabbitmqConfig {
//
//    public static final String EXCHANGE_NAME = "user.behavior.exchange";
//    public static final String QUEUE_NAME = "user.behavior.queue";
//    public static final String ROUTING_KEY = "user.behavior.#";
//
//    @Bean
//    public TopicExchange behaviorExchange(){
//        return new TopicExchange(EXCHANGE_NAME, true, false);
//    }
//
//    @Bean
//    public Queue behaviorQueue(){
//        return new Queue(QUEUE_NAME, true);
//    }
//
//    @Bean
//    public Binding behaviorBinding(Queue behaviorQueue, TopicExchange behaviorExchange){
//        return BindingBuilder.bind(behaviorQueue).to(behaviorExchange).with(ROUTING_KEY);
//    }
//}


